/*
** my_is_prime.c for my_is_prime in /home/labonn_c//Documents/piscine/Jour_O5
** 
** Made by christophe labonnemartinez
** Login   <labonn_c@epitech.net>
** 
** Started on  Tue Oct 11 09:46:28 2011 christophe labonnemartinez
** Last update Tue Oct 11 10:01:39 2011 christophe labonnemartinez
*/

int		my_is_prime(int nb)
{
  unsigned int  i;

  i = 1;
  if ((nb % 2) == 0)
    return (0);
  else
    {
      while (i < nb / 2)
	{
	  if ((nb % i) == 0)
	    return (1);
	  else
	    i = i + 1;
	}
    }
  if (i == nb / 2)
    return (0);
  else
    return (1);
}
